<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8" import="java.util.*"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<%
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ request.getContextPath() + "/";
//response.sendRedirect("common/login");
%>
<c:set var="path" value="${pageContext.request.contextPath }" />
<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>用户管理</title>
			<script type="text/javascript" src="${path }/resource/js/jquery-2.0.3.js"></script>
			<script type="text/javascript" src="${path }/resource/js/mytools.js"></script>
			<script type="text/javascript" src="${path }/resource/layer/layer.js"></script>
			<link rel="stylesheet" href="${path }/resource/bootstrap/css/bootstrap.min.css" />
			<link rel="stylesheet" href="${path }/resource/bootstrap/css/bootstrap-responsive.min.css" />
	</head>
	<body>
	<br>
	<form id="searchFrom">
	<div class="input-prepend input-append">
	  <span class="add-on">账号：</span>
  	 <input class="span2" id="appendedPrependedInput" type="text" name="userAccount" value="${obj.userAccount}" /> 
	 <span class="add-on">用户名：</span>
	<input type="text"  class="span2" name="userName"  id="userName"/>>><br>
	</div>
	<br>
	<input type="button" value="查询" onclick=" mjs.search()" class="btn btn-success"/>
	</form>
		<input type="button" value="新增用户" onclick="mjs.editFrom()" class="btn btn-default btn-xs"/><br>
	<br>
	<div id="tablediv">
		<table id="table1" class="table table-bordered table-hover table-condensed">
		<thead id="thead">
		<tr>
		<th data-name = "userAccount">账号</th>  
		<th data-name = "userName">用户名</th>
		<th data-name = "regTime" data-format="mytooljs.getTime">注册时间</th>
		<th data-name = "userStatus">用户状态</th>
		<th data-name = "userId" data-format="operation">操作</th>  
		</tr>
		</thead>
	</table>
	</div>
	<br>
	<script>
	var mjs =	mytooljs.initTable({  
		idSelecter:"#table1",
		sendurl:"${path}/developer/user/showList" , //求数据的地址
		pagesize:5,//分页大小
		delUrl:"${path}/developer/user/del",//删除数据地址
		editUrl:"${path}/developer/user/editForm" ,//打开编辑或新增页面地址
		windowSize:{'X':"500px",'Y':"500px"}
		});
	
	//操作
	function operation(id){
		var	html="";
		html+="<input type='button' value='编辑' class='btn' onclick='mjs.editFrom("+id+")' />"
		html+="<input type='button' value='删除' class='btn' onclick='mjs.delRec("+id+")' />"
		return html;
	}
	/* 	function addUser(){
			 layer.open({
			      type: 2,
			      title: '新增用户',
			      shadeClose: true,
			      shade: 0.5,
			      maxmin: true, //开启最大化最小化按钮
			      area: ['400px', '400px'],
			      content: '${path}/developer/user-form'
			    });
		} */
	</script>
	</body>
</html>
